;(function($) {
	  $(function () {
	  	// Enable tooltips
	 $('[rel=tooltip]').tooltip();
	  
 
    $(function() {
    	$('#sidebar_menu a.accordion-toggle').on('click',function(){
    		var $current = $(this);
    		var hasClassOpened = $current.closest('li').hasClass('opened');
    		$current.closest('ul').find('li.opened').removeClass('opened');
    		if(!hasClassOpened) {
    			$current.closest('li').addClass('opened');
    		}
    	});
    	

		// Change Dropdown expanding on hover for navbar and set links back
		$('.navbar').on('hover', ' .dropdown', function() {
			$(this).children('.dropdown-toggle').click();
		});
		
    });

		
})(jQuery);